package com.wyk.springbootdemo.mapper;

import com.wyk.springbootdemo.entity.User;
import com.wyk.springbootdemo.entity.UserTest;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserAddMapper {
    @Select("SELECT * FROM USER")
    @Results({
            @Result(column = "username",property = "username")
            //字段名对应
    })
    List<UserTest> getAll();


    @Delete("DELETE FROM USER WHERE id=#{id}")
    public Integer deleteUserById(Integer id);
}

